<template>
  <div>
    <!-- 调用了好评电影的组件 -->
    <haoping :haoping="haoping"></haoping>
   <reying :reyinglist="reyinglist"></reying>
    
  </div>
</template>

<script>
import axios from "axios";
//引入好评电影
import haoping from "@/components/hot/haoping";

import reying from "@/components/hot/reying";
export default {
  name: "hot",
  data: function () {
    return {
      reyinglist: [],
      haoping: "", //接收好评的字符串
    };
  },
  mounted() {
    axios
      .get(
        "/ajax/movieOnInfoList?token=&optimus_uuid=9301B8F0D8A111EBB376757321755EB7A2F821BBA2B047FE86EE9833C24FC202&optimus_risk_level=71&optimus_code=10"
      )
      .then((res) => {
        console.log(res);
        var reyinglist = res.data.movieList;
         reyinglist.forEach((item) => {
          item.img = item.img.replace("w.h", "64.90");
        });
         this.reyinglist = reyinglist;
      });

    //获取好评电影的数据
    axios
      .get(
        "ajax/topRatedMovies?token=&optimus_uuid=9301B8F0D8A111EBB376757321755EB7A2F821BBA2B047FE86EE9833C24FC202&optimus_risk_level=71&optimus_code=10"
      )
      .then((res) => {
        console.log(res);
        this.haoping = res.data;
      });
  },
  components: {
    haoping,
    reying,
  },
};
</script>

<style scoped>
.list li {
  width: 100%;
  height: 114px;
  background: lightsalmon;
}
</style>